<T:ViewBase x:Class="WPFExcelReport.TKASTGA02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAKANR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAKANR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAKAPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAKAPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAPSA:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAPSA}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAFPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAFPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAART}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAVAR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAVAR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAFARBE:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAFARBE}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAFDZ:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAFDZ}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KGAABF:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTGA.KGAABF}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsKASTGA,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwKASTGA}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwKASTGA, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="KGAMANDANT"
                                    Binding="{Binding Path=KGAMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAKANR"
                                    Binding="{Binding Path=KGAKANR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAKANR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAKAPOS"
                                    Binding="{Binding Path=KGAKAPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAKAPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAPSA"
                                    Binding="{Binding Path=KGAPSA, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAPSA}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAPOS"
                                    Binding="{Binding Path=KGAPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAFPOS"
                                    Binding="{Binding Path=KGAFPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAFPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAART"
                                    Binding="{Binding Path=KGAART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAVAR"
                                    Binding="{Binding Path=KGAVAR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAVAR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAFARBE"
                                    Binding="{Binding Path=KGAFARBE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAFARBE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAFDZ"
                                    Binding="{Binding Path=KGAFDZ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAFDZ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAABF"
                                    Binding="{Binding Path=KGAABF, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAABF}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAKGNET"
                                    Binding="{Binding Path=KGAKGNET, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAKGNET}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAKGBRUT"
                                    Binding="{Binding Path=KGAKGBRUT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAKGBRUT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAPART"
                                    Binding="{Binding Path=KGAPART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAPART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAZUSCHL1"
                                    Binding="{Binding Path=KGAZUSCHL1, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAZUSCHL1}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAZUSCHL2"
                                    Binding="{Binding Path=KGAZUSCHL2, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAZUSCHL2}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAZUSCHL3"
                                    Binding="{Binding Path=KGAZUSCHL3, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAZUSCHL3}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAZUSCHL4"
                                    Binding="{Binding Path=KGAZUSCHL4, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAZUSCHL4}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAZUSCHL5"
                                    Binding="{Binding Path=KGAZUSCHL5, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAZUSCHL5}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAZUSCHL6"
                                    Binding="{Binding Path=KGAZUSCHL6, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAZUSCHL6}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGABPREIS"
                                    Binding="{Binding Path=KGABPREIS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGABPREIS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAPREIS"
                                    Binding="{Binding Path=KGAPREIS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAPREIS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAKOSTEN"
                                    Binding="{Binding Path=KGAKOSTEN, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAKOSTEN}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAMGK1"
                                    Binding="{Binding Path=KGAMGK1, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAMGK1}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAMGK2"
                                    Binding="{Binding Path=KGAMGK2, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAMGK2}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAMGK3"
                                    Binding="{Binding Path=KGAMGK3, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAMGK3}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAMGK4"
                                    Binding="{Binding Path=KGAMGK4, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAMGK4}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAMGK5"
                                    Binding="{Binding Path=KGAMGK5, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAMGK5}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAGAAEND"
                                    Binding="{Binding Path=KGAGAAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAGAAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGANETAEND"
                                    Binding="{Binding Path=KGANETAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGANETAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAABFAEND"
                                    Binding="{Binding Path=KGAABFAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAABFAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAPRAEND"
                                    Binding="{Binding Path=KGAPRAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAPRAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAFREMD"
                                    Binding="{Binding Path=KGAFREMD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAFREMD}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGARECHNUM"
                                    Binding="{Binding Path=KGARECHNUM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGARECHNUM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGARECHNR"
                                    Binding="{Binding Path=KGARECHNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGARECHNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAGARNBEZ"
                                    Binding="{Binding Path=KGAGARNBEZ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAGARNBEZ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KGAFILLER"
                                    Binding="{Binding Path=KGAFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KGAFILLER}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
